package com.hyfrogx.modules.information.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyfrogx.modules.information.dao.InfoImgDao;
import com.hyfrogx.modules.information.entity.InfoImgEntity;
import com.hyfrogx.modules.information.service.InfoImgService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liubin
 * @date 2019/10/31 18:56
 */
@Service("InfoImgService")
@Slf4j
public class InfoImgServiceImpl extends ServiceImpl<InfoImgDao, InfoImgEntity>
  implements InfoImgService {
  @Override
  public void put(List<InfoImgEntity> infoImgs, Integer id) {
    for (InfoImgEntity infoImg : infoImgs) {
      infoImg.setInfoId(id);
      this.baseMapper.insert(infoImg);
    }
  }
}
